<?php 
if ($paging=$this->db->paging){
if($p_url){
	$page_url = htmlq($p_url.'&limit='.$_GET['limit'].'&p=');
	$limit_url= htmlq($p_url.'&limit=');
}else{
	$page_url = htmlq(url::p('p'));
	$limit_url= htmlq(url::p('limit&p'));
}

?>
<div class="paging">
<?php if($paging['p']>1){?><a href="<?php echo $page_url .($paging['p']-1);?>" title="上翻">&lt;</a><?php }?>
<span class="n"><?php foreach($paging['page_li'] as $v){ if($v==$paging['p'])
{?><span class="edit" onClick="q_edit(this,function(v){location='<?php echo $page_url;?>'+ v;})"><?php echo $v ?></span><?php }else
{echo '<a href="'. $page_url . $v.'">'.$v.'</a>';}}?></span>
<?php if($paging['p']<$paging['pages']){?><a href="<?php echo $page_url .($paging['p']+1);?>" title="下翻">&gt;</a><?php }?>
<?php if($paging['num']){?>&nbsp;&nbsp;每页<span class="edit" onClick="q_edit(this,function(v){location='<?php echo $limit_url?>'+ v;})"><?php echo $paging['limit']?></span>条，共<?php echo $paging['num']?>条<?php }?>
</div>
<?php }?>
